package org.hackystat.sdsa.analyzer.model.activity.refactoring;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

/**
 * Tests refactor subject.
 * 
 * @author Hongbing Kou
 * @version $Id: TestRefactorSubjectType.java 281 2005-11-10 22:25:19Z hongbing $
 */
public class TestRefactorSubjectType  {
  /**
   * Tests refactor subject.
   */
  @Test public void testSubject() {
    RefactorSubjectType classSubject = RefactorSubjectType.getInstance("CLASS");
    assertEquals("Test class subject", "CLASS", classSubject.getName());
    assertEquals("Test class subject", classSubject, RefactorSubjectType.getInstance("CLASS"));
    
    RefactorSubjectType methodSubject = RefactorSubjectType.getInstance("METHOD");
    assertEquals("Test method subject", "METHOD", methodSubject.getName());

    RefactorSubjectType fieldSubject = RefactorSubjectType.getInstance("FIELD");
    assertEquals("Test field subject", "FIELD", fieldSubject.getName());
  }
}
